<template>
    <div class="markdown">
        <!-- <h1>哈啊哈哈</h1> -->
        <textarea v-model="acticle.markdown"></textarea>
        <vue-markdown :source="acticle.markdown" class="qqq"></vue-markdown>
        
    </div>
</template>

<script>
import axios from 'axios'
import VueMarkdown from 'vue-markdown'
export default {
    
    name: 'VueActicle',
    components:{
        VueMarkdown
    },
    

    data() {
        return {
            acticle:{}
        };
    },

   created() {
       const id = this.$route.params.id
       axios({
           url:`https://gank.io/api/v2/post/${id}`
       }).then(res=>{
           this.acticle = res.data.data
           console.log(res.data)
       })
   },

    methods: {
        
    },
};
</script>

<style  >
.markdown{
    width: 1000px;
    margin: 0 auto;
    border: 2px solid salmon;
    /* background-color: #999; */
    padding: 20px;
}
.markdown .qqq{
    width: 100%;
    
}
.markdown .qqq img{
    max-width: 100%;
}
</style>